<!--{include header}-->
<!--{if $order}-->
		<div class="mtips" id="nopayDiv"><span class="red">您已经下过订单，但还没有付款。（<a id="payurl" href="/order/check.php?id={$order['id']}">点击付款</a>）</span></div>
<!--{/if}--> 
<script src="/static/theme/58/js/jquery.lazyload.mini.js" type="text/javascript"></script>
	<!--{include block_navigator_ev56_s}-->

	<div class="iwrap"> 
  <!-- 左侧 -->
  <div class="i_fl"> 	
    <!-- 商品主介绍 -->
	<!--{loop $teams_ev56_sql $tindex $oneev56}-->
    <div class="main">
      <h2><span class="c2">今日团购${++$mindex}：</span><a href="/team.php?id={$oneev56['id']}">{$oneev56['title']}</a></h2>
      <div class="mmain">
        <div class="lmain">
          <table class="discount" cellpadding="0" cellspacing="0">
            <tbody>
              <tr>
                <th>原价</th>
                <th>折扣</th>
                <th>节省</th>
              </tr>
              <tr>
                <td>&yen;${moneyit($oneev56['market_price'])}</td>
                <td>${team_discount($oneev56)}折</td>
				                <td><span class="c2">&yen;${moneyit($oneev56['market_price']-$oneev56['team_price'])}</span></td>
              </tr>
            </tbody>
          </table>
					<!--{if ($oneev56['state']=='soldout')}-->				
					
		  				<div class="buyinfo">	
						 <p class="buynum">团购已卖光<br/>共有<span class="c2">{$oneev56['now_number']}</span>人购买</p>
						 <p class="timeleft"><span class="savetime">{$diff_time}000</span>本团购结束时间：<br/><span class="showTime">${date('Y-m-d', $oneev56['close_time'])} ${date('H:i:s', $oneev56['close_time'])}</span></p>
			             <p class="success s_js">团购已卖光，查看<a href="/index.php">其他团购</a></p>
													  	</div>
	          	<div class="order sold"><span>已卖光</span><em >&yen;${moneyit($oneev56['team_price'])}</em></div>
					<!--{elseif $oneev56['close_time']}-->				
					
		  				  <div class="buyinfo">	
											 <p class="buynum">团购已结束<br/>共有<span class="c2">{$oneev56['now_number']}</span>人购买</p>
						 <p class="timeleft"><span class="savetime">{$diff_time}000</span>本团购结束于：<br/><span class="showTime">${date('Y-m-d', $oneev56['close_time'])} ${date('H:i:s', $oneev56['close_time'])}</span></p>
			             <p class="success s_js">团购已结束，查看<a href="/index.php">其他团购</a></p>
													  	</div>
	          	<div class="order end"><span>已结束</span><em >&yen;${moneyit($oneev56['team_price'])}</em></div>
					<!--{else}-->
				
		  				<div class="buyinfo">
			            <p class="buynum"><span class="c2">{$oneev56['now_number']}</span>人已购买<br/>数量有限，下单要快哟</p>
							<script>
      	//var nowDate = {$now}000;
      	//var endDate = new Date(Date.parse("${date('Y-m-d H:i:s', $oneev56['end_time'])}".replace(/-/g,"/")));
		//var remainTime{$oneev56['id']} = endDate.getTime()-nowDate;
		var remainTime{$oneev56['id']} = {$detail[$oneev56['id']]['diff_time']}000;
		window.setInterval(function(){
			remainTime{$oneev56['id']}=remainTime{$oneev56['id']}-1000;
			var leftsecond = parseInt(remainTime{$oneev56['id']}/1000);	
			var day{$oneev56['id']}=Math.floor(leftsecond/(60*60*24)); 
			var hour{$oneev56['id']}=Math.floor((leftsecond-day{$oneev56['id']}*24*60*60)/3600); 
			var minute{$oneev56['id']}=Math.floor((leftsecond-day{$oneev56['id']}*24*60*60-hour{$oneev56['id']}*3600)/60); 
			var second{$oneev56['id']}=Math.floor(leftsecond-day{$oneev56['id']}*24*60*60-hour{$oneev56['id']}*3600-minute{$oneev56['id']}*60); 		
			if(day{$oneev56['id']} > 0){ 
				$("#deal-timeleft{$tindex}").html("<i>"+day{$oneev56['id']}+"</i>天<i>"+hour{$oneev56['id']}+"</i>小时<i>"+minute{$oneev56['id']}+"</i>分<i>"+second{$oneev56['id']}+"</i>秒");	
			}
			else{
				if(hour{$oneev56['id']} == 0 && minute{$oneev56['id']} == 0 && second{$oneev56['id']} ==0){
				    $.ajax({			    	
						  type: "GET",
						  url: "/cache/all",
						  async:false,
						  success:function(){
						  	setTimeout('window.location.href="/team"',1000);
						  }
				    });
				}
				else{
					$("#deal-timeleft{$tindex}").html("<i>"+hour{$oneev56['id']}+"</i>小时<i>"+minute{$oneev56['id']}+"</i>分<i>"+second{$oneev56['id']}+"</i>秒");
				}	
			}	
		}, 1000);
</script>
			            <p class="timeleft"><span  id="savetime{$tindex}" class="savetime">{$detail[$oneev56['id']]['diff_time']}000</span> 距离本次团购结束还有：<br/><span id="deal-timeleft{$tindex}" class="showTime"><i>加载中...</i></span> </p>
						<p class="success">团购已成功，可继续购买</p>
											  </div>
					  <div class="order ${$oneev56['begin_time']<time()?'buy':'wait'}">
						<a ${$oneev56['begin_time']<time()?'href="/team/buy.php?id='.$oneev56['id'].'"':''}>抢购</a>
						<em >&yen;${moneyit($oneev56['team_price'])}</em>
					</div>
					
					<!--{/if}--> 
					
					
					
			    		           </div>
		<div class="rmain"> 
					<img src="${team_image($oneev56['image'])}"  width="440" height="275" alt="{$oneev56['title']}" />
				<div class="buytips"><div class="quote">
	<span><!--{if strip_tags($oneev56['summary'])!=$oneev56['summary']}-->{$oneev56['summary']}<!--{else}--><div class="digest">${nl2br(strip_tags($oneev56['summary']))}</div><!--{/if}--></span></div>
</div>
		</div>
        <div class="clear"></div>
      </div>
      <span class="yj lt"></span><span class="yj rt"></span><span class="yj lb"></span><span class="yj rb"></span>


<!--{if $oneev56['id']}-->
<div class="ishare c3">
        <ul>
          <li>分享给好友购买</li>
		  <!--<li><a class="i_im" href="javascript:void(0);" id="deal-share-im-line" onclick="jQuery('.deal-share-{$oneev56['id']}').toggle();">MSN/QQ</a></li>-->
          <li><a class="i_sina" href="${share_sina($oneev56)}" target="_blank">新浪微博</a></li>
          <li><a class="i_qzone" onclick="window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+encodeURIComponent(document.location.href));return false;" href="javascript:void(0);">QQ空间</a></li>
          <li><a class="i_renren" href="${share_renren($oneev56)}" target="_blank">人人</a></li>
          <li><a class="i_qq" href="${share_tencent($oneev56)}" target="_blank">腾讯微博</a></li>
          <li><a class="i_kaixin" href="${share_kaixin($oneev56)}" target="_blank">开心</a></li>
          <li><a class="i_douban" href="${share_douban($oneev56)}" target="_blank">豆瓣</a></li>
		  <!--<li><a class="i_email" href="${share_mail($oneev56)}" id="deal-buy-mailto">邮件</a></li>-->
        </ul>
        <span class="fx flt1"></span><span class="fx frt1"></span>
      </div>
	  
<!--{/if}-->

    </div>
			<div style="width:100%; height:30px; float:left;"></div>
			<script>window.x_init_hook_multiclock{$tindex} = function(){X.misc.multiclock('deal-timeleft{$tindex}', 'savetime{$tindex}');};</script>
		<!--{/loop}-->
<!--{if (option_yes('indexmulti')&& option_yes('indexpage')) }-->
					<div  class="class_quick_fm">{$pagestring}</div>	
<!--{/if}-->
    <!-- 商品主介绍 end --> 
	
  </div>
  <!-- 左侧 end --> 
  <div class="i_fr">
		<!--每日签到-->
		<!--{include block_side_daysign}-->
		<!--产品视频-->
		<!--{include block_side_flv}-->   
		<!--今日其他团购-->
		<!--{include block_side_others}-->
		<!--今日秒杀--> 
		<!--{include block_side_others_seconds}--> 
		<!--本单答疑--> 
		<!--{include block_side_ask}-->
		<!--网站公告-->
		<!--{include block_side_bulletin}-->   
		<!--网站新闻--> 
		<!--{include block_side_news}-->
		<!--手机访问-->
		<!--{include block_side_mobile}-->  
		<!--小调查-->
		<!--{include block_side_vote}-->    
		<!--邀请有奖、加入我们-->  	
		<!--{include block_side_job}-->
  </div>
  <div class="clear"></div>
</div>


<!--{include footer}-->
